package com.ls.lserp.modules.purchase.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ls.lserp.common.persistence.Page;
import com.ls.lserp.common.service.CrudService;
import com.ls.lserp.modules.common.entity.OgnizationEntity;
import com.ls.lserp.modules.purchase.dao.SelPurchaseMaterialDao;
import com.ls.lserp.modules.purchase.entity.SelPurchaseMaterial;

@Service
@Transactional(readOnly = false)
public class SelPurchaseMaterialService extends CrudService<SelPurchaseMaterialDao,SelPurchaseMaterial>{

	    @Autowired
	    private SelPurchaseMaterialDao selPurchaseMaterialDao;
	    
		/**
		 * @Title: 原辅料共同画面一览
		 */
		/**
		 * @Title: findList
		 * @Description: 一览查询
		 * @param page
		 * @param selPurchaseMaterial
		 * @return Page<SelPurchaseMaterial>
		 */
		public Page<SelPurchaseMaterial> findList(Page<SelPurchaseMaterial> page, SelPurchaseMaterial selPurchaseMaterial) {
			// 设置分页参数
			selPurchaseMaterial.setPage(page);
			// 执行分页查询
			page.setList(selPurchaseMaterialDao.findList(selPurchaseMaterial));
			return page;
		}

		/**
		 * @Title: 原辅料画面用客户list
		 */
		/**
		 * @Title: getOgizationList
		 * @return List<OgnizationEntity>
		 */
		public List<OgnizationEntity> getOgizationList() {
			List<OgnizationEntity> ogizationList = selPurchaseMaterialDao.getOgizationList();
			return ogizationList;
		}
		
//		/**
//		 * @Title: 采购合同list
//		 */
//		/**
//		 * @Title: getContractMeterialNoList
//		 * @return List<SelPurchaseMaterial>
//		 */
//		public List<SelPurchaseMaterial> getContractMeterialNoList(SelPurchaseMaterial selPurchaseMaterial) {
//			List<SelPurchaseMaterial> purchaseRequestList = selPurchaseMaterialDao.getContractMeterialNoList(selPurchaseMaterial);
//			return purchaseRequestList;
//		}
}
